package com.freight.order.mapper;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.freight.order.entity.QuotationDetails;
import com.freight.order.entity.QuotationRecord;
import com.freight.order.vo.PlatQuotationRecordVo;
import com.freight.order.vo.QuotationRecordVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface QuotationRecordMapper  {



    QuotationRecord getQuotationorderId(Long orderId);

    List<QuotationRecord> getCompanyQuotationRecord(@Param(value = "orderGoodsId") Long orderGoodsId);


    /**
     * 根据用户id和货源ID获取是否有待委托记录
     * @param
     * @return
     */
    List<QuotationDetails> getQuotationDetailsIds(@Param(value = "recordId") Long[] recordId);

    /**
     * 根据用户id和货源ID获取是否有待委托记录
     * @param
     * @return
     */
    List<QuotationRecord> getQuotationRecordList(@Param(value = "orderGoodsId") Long orderGoodsId, @Param(value = "userId") Long userId);

    /**
     *
     * @param recordId
     * @return
     */
     List<QuotationDetails> getQuotationDetails(Long recordId);

    /**
     *
     * @param recordId
     * @return
     */
    QuotationRecord getQuotationRecord(Long recordId);

    /**
     * 根据货源ID获取报价状态
     * @param orderGoodsId
     * @param userId
     * @return
     */
    QuotationRecordVo driverQuotationState(@Param(value = "orderGoodsId") Long orderGoodsId, @Param(value = "userId") Long userId);

    /**
     * 司机 --- 获取司机报价记录
     * @param orderGoodsId
     * @return
     */
    List<QuotationRecordVo> driverRecord(@Param(value = "orderGoodsId") Long orderGoodsId, @Param(value = "userId") Long userId);

    /**
     * 获取司机报价记录
     * @param orderGoodsId
     * @return
     */
    Page<QuotationRecordVo> driverQuotationRecord(@Param(value = "orderGoodsId") Long orderGoodsId, @Param(value = "loadTime") String loadTime,Page<QuotationRecordVo> page);

    /**
     * 货主端 --- 获取报价记录
     * @param orderGoodsId
     * @return
     */
    Page<QuotationRecordVo> platformQuotationRecord(@Param(value = "orderGoodsId") Long orderGoodsId,@Param(value = "entrustState") String entrustState,Page<QuotationRecordVo> page,@Param(value = "priceSort") String  priceSort);

    /**
     * 平台端 --- 获取报价记录
     * @param orderGoodsId
     * @return
     */
    Page<PlatQuotationRecordVo> platformQuotationPage(@Param(value = "orderGoodsId") Long orderGoodsId, Page<PlatQuotationRecordVo> page);

    Page<PlatQuotationRecordVo> companyplatformQuotationRecord(@Param(value = "orderGoodsId") Long orderGoodsId, Page<PlatQuotationRecordVo> page, @Param(value = "userId") Long userId);


    /**
     * 平台端 --- 根据订单id获取报价记录
     * @param orderId
     * @return
     */
    List<PlatQuotationRecordVo> platformQuotation(@Param(value = "orderId") Long orderId );


    /**
     * 平台端 --- 根据订单id获取报价记录
     * @param quotationRecordId
     * @return
     */
    List<PlatQuotationRecordVo> platformQuota(@Param(value = "quotationRecordId") Long quotationRecordId);

    /**
     * 平台端 --- 获取报价记录
     * @param quotationRecordId
     * @return
     */
    List<PlatQuotationRecordVo> platformQuotaPage(@Param(value = "quotationRecordId") Long quotationRecordId);


}
